package com.neu.api.mapper;

import com.github.pagehelper.Page;
import com.neu.api.dto.CustomerDTO;
import com.neu.api.pojo.Customer;
import com.neu.api.pojo.User;
import com.neu.api.query.UserQuery;
import com.neu.api.vo.CustomerVO;
import com.neu.api.vo.UserVO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CustomerMapper {



    List<CustomerVO> find();

    /**
     * 用户登录
     * @param phone
     * @param password
     * @return
     */
    public CustomerVO login(String phone, String password);

    /**
     * 注册
     * @param customer
     */
    public void add(Customer customer);

    /**
     * 编辑
     * @param customer
     */
    public void update(Customer customer);

    /**
     * 删除
     * @param id
     */
    @Delete("delete from t_customer where id = #{id}")
    public void deleteById(Long id);
}